import { httpGet, httpPost, httpDelete, httpPut } from '@/http'
import { services } from '@/config'

export const getPage = data => httpPost(`${services.personnelService}book/page`, data)

export const groupPage = data => httpPost(`${services.personnelService}book/groupPage`, data)

export const bookGroupPage = (id, data) => httpPost(`${services.personnelService}book/bookGroupPage/${id}`, data)

export const save = data => httpPost(`${services.personnelService}book`, data)

export const load = id => httpGet(`${services.personnelService}book/${id}`)

export const create = () => httpGet(`${services.personnelService}book/create`)

export const update = data => httpPut(`${services.personnelService}book`, data)

export const del = id => httpDelete(`${services.personnelService}book/${id}`)

export const batchDelete = ids => httpDelete(`${services.personnelService}book/batchDelete`, ids, null, false)
